#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QListWidgetItem>
#include "databasefacade.h"
#include "csdatabaselogin.h"
#include "settingsdialog.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:

    void on_LoggedIn();

    void on_NotLoggedIn();

    void on_Canceled();

    void on_SingleFile();

    void on_btnAdd_clicked();

    void on_btnDelete_clicked();

    void on_btnUpdate_clicked();

    void on_actionExit_triggered();

    void on_actionAbout_triggered();

    void on_lstUsers_itemClicked(QListWidgetItem *item);

    void on_btnClear_clicked();

private:
    Ui::MainWindow *ui;

    bool IsSingleFile;

    bool IsSingleFileStored;

    bool IsLoggedIn;

    CSDatabaseLogin *dbl;

    void DisconnectLoginDialog();

    DataBaseFacade *df;

    SettingsDialog *sd;

    CSSettingsInformation *sds;

    bool isDeleting;

    int UserID;

    void UpdateButtons();

    void ReloadList();
};

#endif // MAINWINDOW_H
